<template>
  <div class="child">
    <h1>child</h1>
    <h2>$parent.title:{{ title }}</h2>
    <button @click="handle">获取$parent.title</button>
    <button @click="title = 'hello! from child'">改变$parent.title</button>
    <grandson />
  </div>
</template>

<script>
import grandson from "./grandson.vue";
export default {
  components: {
    grandson
  },
  inject: ["title", "handle"]
};
</script>
